<form action="<?php echo $this->url(array("action"=>"edit")) ?>" method="post" id="insert-form" enctype="multipart/form-data">
   <?php $a = $this->Adv?>
                <div class="form-left">
                    <label for="IDUSer">Mã Người Dùng: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <select name="IDUser" id="theme">
                    <?php foreach ($this->userall as $u):?>
                        <option value="<?php echo $u->ID?>"><?php echo $u->USERNAME?></option>
                    <?php endforeach;?>
                    </select>
                </div>
                <div class="form-left">
                    <label for="NameAdv">Tiêu Đề Quảng Cáo: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <input type="text" name="NameAdv" class="txt" id="NameAdv" value="<?php echo $a->AD_NAME?>" />
                    <p><?php echo $this->errorAdv?></p>
                </div>
                <div class="form-left">
                    <label for="Position">Vị Trí: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <input type="text" name="Position" class="txt" id="Position" value="<?php echo $a->POSITION?>" />
                    <p><?php echo $this->errPos?></p>
                </div>
                <div class="form-left">
                    <label for="CompName">Tên Công Ty: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <input type="text" name="CompName" class="txt" id="CompName" value="<?php echo $a->COMPANY_NAME?>" />
                    <p><?php echo $this->errComp?></p>
                </div>
 
				 	<script type="text/javascript" src="<?php echo $this->baseUrl()?>/public/ckeditor/ckeditor.js"></script>
					<script type="text/javascript" src="<?php echo $this->baseUrl()?>/public/ckeditor/_samples/sample.js"></script>

                <div class="form-left">
                    <label for="desc">Mô Tả: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <textarea name="desc" id="editor" class="txt editor" cols="100" rows="200" id="desc"><?php echo $a->DESCRIPTION?></textarea>
                    <script type="text/javascript">CKEDITOR.replace( 'editor' );</script>
                    <?php echo $this->errDesc?>
                </div>
                <div class="form-left">
                    <label for="preview">Hình Ảnh: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <input type="file" name="AdvImg" class="txt" id="AdvImg" />
                </div>
                <div class="form-left">
                    <label for="Link">Link Ảnh: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <input type="text" name="Link" class="txt" id="Link" value="<?php echo $a->AD_IMG?>" />
                </div>
                <div class="form-left">
                    <label for="stt">Trạng Thái: <span class="required">*</span></label>
                </div>
                <div class="form-right">
                    <select name="stt" id="theme">
                        <?php if($a->STATUS == 1){?>
                        <option value="1" selected="selected">Kích Hoạt</option>
                        <option value="0">Không Kích Hoạt</option>
                        <?php }else{?>
                        <option value="1">Kích Hoạt</option>
                        <option value="0" selected="selected">Không Kích Hoạt</option>
                        <?php }?>
                    </select>
                </div>
               
                <div class="clear" style="text-align:right; width:372px">
                    <input type="submit" value="Save" style="float:right" />
                </div>
 			</form>
 			<script type="text/javascript" src="<?php echo $this->baseUrl()?>/public/js/tablesort.js"></script>
    		<script type="text/javascript" src="<?php echo $this->baseUrl()?>/public/js/jquery.nyromodal-1.6.2.pack.js"></script>
    		<script type="text/javascript" charset="utf-8" src="<?php echo $this->baseUrl()?>/public/js/jquery.uniform.min.js" ></script>